Micron Document
🎖️GitЯра🎖️


Displaying Raw • Download

core/repository/src/commonMain/kotlin/org/meshtastic/core/repository/PlatformAnalytics.kt bf929c20f274232e0eb8ddc19b2dc82403e99e5b (bf929c20) Text, 2.41 KB

T8b949e/*
* Copyright (c) 2026 Meshtastic LLC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
Tff7b72package T7ee787org.meshtastic.core.repository

T8b949e/**
* Interface to abstract platform-specific functionalities, primarily for analytics and related services that differ
* between product flavors.
*/
Tff7b72interface T56d364PlatformAnalytics Tb4b4b4{

Tff7b72fun Td2a8fftrackTb4b4b4(Te6edf3eventTb4b4b4: Tffa657StringTb4b4b4, Tff7b72vararg Te6edf3propertiesTb4b4b4: Te6edf3DataPairTb4b4b4)

T8b949e/**
* Sets device-specific attributes (e.g., firmware version, hardware model) for analytics.
*
* @param firmwareVersion The firmware version of the connected device.
* @param model The hardware model of the connected device.
*/
Tff7b72fun Td2a8ffsetDeviceAttributesTb4b4b4(Te6edf3firmwareVersionTb4b4b4: Tffa657StringTb4b4b4, Te6edf3modelTb4b4b4: Tffa657StringTb4b4b4)

T8b949e/**
* Tracks a successful device connection as a custom RUM action, aligned with the Meshtastic-Apple DataDog
* integration for cross-platform analytics comparison.
*
* @param firmwareVersion The firmware version of the connected device (major.minor).
* @param transportType The transport used for the connection (e.g., "BLE", "TCP", "USB").
* @param hardwareModel The hardware model name of the connected device.
* @param nodes The total number of nodes in the mesh network.
* @param connectionRestored True if this connection was restored from device sleep rather than a fresh connect.
*/
Tff7b72fun Td2a8fftrackConnectTb4b4b4(
Te6edf3firmwareVersionTb4b4b4: Tffa657String?Tb4b4b4,
Te6edf3transportTypeTb4b4b4: Tffa657String?Tb4b4b4,
Te6edf3hardwareModelTb4b4b4: Tffa657String?Tb4b4b4,
Te6edf3nodesTb4b4b4: Tffa657IntTb4b4b4,
Te6edf3connectionRestoredTb4b4b4: Tffa657BooleanTb4b4b4,
Tb4b4b4) Tb4b4b4{
T8b949e// Default no-op for platforms that don't support RUM (fdroid, desktop)
Tb4b4b4}

T8b949e/**
* Indicates whether platform-specific services (like Google Play Services or Datadog) are available and
* initialized.
*/
Tff7b72val Te6edf3isPlatformServicesAvailableTb4b4b4: Tffa657Boolean
Tb4b4b4}

Served by rngit 1.5.0 - Generated in 0.04s